package libs;

import java.util.Date;

/**
 *  Attendance record in attendance book
 *
 * @author Dejvino
 */
public class AttendanceEntry {
    private Date date;
    private boolean present;

    public AttendanceEntry(Date date, boolean present){
        if(date == null)
            throw new NullPointerException("date");
        this.date = date;
        this.present = present;
    }

    public AttendanceEntry(boolean present){
        this(new Date(), present);
    }

    public AttendanceEntry(){
        this(true);
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public boolean isPresent() {
        return present;
    }

    public void setPresent(boolean present) {
        this.present = present;
    }
}
